#!/bin/bash

mkdir -p /usr/local/software
cd /usr/local/software
wget https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm
sudo rpm -Uvh mysql57-community-release-el7-11.noarch.rpm
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
yum -y install mysql-community-server
service mysqld start
grep 'temporary password' /var/log/mysqld.log
rm -rf mysql57-community-release-el7-11.noarch.rpm
